<template>
  <el-table :data="attendanceList" style="width: 100%" @row-click="godetail"
    :header-cell-style="{ backgroundColor: '#f5f6f8', height: '59px', fontSize: '14px' }">
    <el-table-column prop="id" label="序号" width="55" />
    <el-table-column prop="username" label="姓名" sortable />
    <el-table-column prop="mobile" label="手机" sortable />
    <el-table-column prop="workNumber" label="工号" sortable />
    <el-table-column prop="departmentName" label="部门" sortable />
    <el-table-column prop="timeOfEntry" label="入职时间" sortable />
    <el-table-column prop="leaveTime" label="离职时间" sortable />
    <el-table-column prop="participatingInTheCity" label="社保城市" sortable />
    <el-table-column prop="providentFundCity" label="公积金城市" sortable />
    <el-table-column prop="socialSecurityBase" label="社保基数" sortable />
    <el-table-column prop="providentFundBase" label="公积金基数" sortable />
  </el-table>
  <div style="display: flex;justify-content: center;margin-top: 10px">
    <el-pagination layout="prev, pager, next" :total="Number(total)" @change="handleCurrentChange" />
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import fenye from './Social/fenye.vue';
import { useStore } from '@/stores/counter'
import { useRouter } from 'vue-router'
const store = useStore()
const router = useRouter()
defineProps(["attendanceList", 'handleCurrentChange', 'total'])
const godetail = (row: any) => {
  console.log(row.id);
  router.push('/home/social/detail?id=' + row.id)
}
</script>

<style scoped></style>